package com.service;

import com.dao.OrderDAO;
import com.dao.OrderDetailDAO;
import com.model.Order;
import com.model.OrderDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {
    @Autowired
    private OrderDAO orderDAO;


    /*step1: 在OrderDetailDAO添加方法*//*
    @Autowired
    private OrderDetailDAO detailDAO;
    public List<OrderDetail> getListByOrderId(Integer orderId){
        return    detailDAO.selectByOrderId(orderId);
    }*/

    public Order getSingle(Integer orderId){
        return  orderDAO.selectByPrimaryKey(orderId);
    }



}
